//
//  ChooseTeacherTableViewController.m
//  PT
//
//  Created by jarze on 15/6/9.
//  Copyright (c) 2015年 jarze. All rights reserved.
//

#import "BasicTableViewController.h"

@interface BasicTableViewController ()

@end

@implementation BasicTableViewController

- (NSMutableArray *)datas
{
    if (_datas == nil) {
        _datas = [NSMutableArray array];
    }
    return _datas;
}

//- (id)init
//{
//    return [super initWithStyle:UITableViewStyleGrouped];
//
//
//}
//- (id)initWithStyle:(UITableViewStyle)style
//{
//    return [super initWithStyle:UITableViewStyleGrouped];
//
//
//}


- (void)viewDidLoad {
    [super viewDidLoad];
    //设置tableView没有分割线
 
    }


- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

    return _datas.count;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    Group *g = self.datas[section];
    return g.items.count;
   
}







    
//    
//    SettingCellTableViewCell *cell = [SettingCellTableViewCell cellWithTableView:self.tableView];
//    Group *g = self.datas[indexPath.section];
//    
//    //  从组模型中取出对应行的模型
//   Item *item = g.items[indexPath.row];
//    cell.item = item;
//
//    cell.item = g.items[indexPath.row];
//    return cell;
//}
////

    
    
    
    
//    
        //    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier: ID];
//
//    if (cell == nil) {
//        
//        UINib *nib = [UINib nibWithNibName:@"HeaderCell" bundle:[NSBundle mainBundle]];
//        NSArray *objects = [nib instantiateWithOwner:Nil options:Nil];
//        cell = objects[0];
//                }
//        
//        
//                return cell;
    


    
    


// - (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)indexPath

/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}
*/

/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }   
}
*/

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
